<?php
require_once('db/head.php');

header('Content-Type: text/html;charset=utf-8');
/*
	此文件只负责将数据表中文件上传进度更新为100%
		向数据库添加新记录在 ajax_create_fid.php 文件中处理
	如果服务器不存在此文件，则添加一条记录，百分比为100%
	如果服务器已存在相同文件，则将文件上传百分比更新为100%
*/

function sm4_test(){
	echo "asp.net sm4 加密结果：25TZ85Efttj0fVugdXe1Bw==<br/>";
	$s = "123456";
	echo $s;
	$c = new CryptoTool();
	$s = $c->sm4_encode($s);
	var_dump($s);
	$s = $c->sm4_decode($s);
	var_dump($s);
}

sm4_test();
//$txt = "MyEclipse8.5\\u6c49\\u5316.doc";
$nid = 0;
//$cr = new ConfigReader();
//$db = $cr->module("database.up6_files");
//$fields = $db->get("$.fields");
//var_dump($fields );
//var_dump(openssl_get_cipher_methods());
//throw new Up6Exception("加密块大小",[1,2]);

// $sql = new SqlExec();
// //$sql->exec("up6_files","update up6_files set f_pid=1","","",null);
// //$ret = $sql->exec_arr("up6_files","select * from up6_files","*",null);
// //$ret = $sql->read("up6_files", "*", array("f_id"=>"7141fda47623499db1ff331b21edd7e4"));
// //$sql->update("up6_files", "f_pid", "f_id", array("f_id"=>"7141fda47623499db1ff331b21edd7e4","f_pid"=>"0"));
// //$sql->delete("up6_files", array("f_id"=>"7141fda47623499db1ff331b21edd7e4"));
// //$ret = $sql->count("up6_files", null);
// //$ret = $sql->count("up6_files", array("f_pid"=>"2"));
// //$ret = $sql->select("up6_files","*",array("f_id"=>"7aaf6d32e202444b9d52a757e424f881"));
// $ret = $sql->page("up6_files","*","","",20,1);
// //var_dump($ret);

// $web = new WebBase();
// //$ret = $web->path("fm");
// //$ret = $web->require("test.js","tes.css");
// //var_dump($ret);
// //$web->toContent("abcd");
// //var_dump($web->paramPage());

// //$mgr = new PageFileMgr();

// //$sql->update2("up6_files", array("f_pid"=>"0"), array("f_id"=>"7aaf6d32e202444b9d52a757e424f881"));
// $pars = array();
// $pars[] = array("f_id"=>"7aaf6d32e202444b9d52a757e424f881");
// $pars[] = array("f_id"=>"88620663c9e7424fae9c0ffc4146e8f4");
// $sql->exec_batch("up6_files", "update up6_files set f_deleted=0 where f_id=:f_id", "", "f_id", $pars);

// echo "test";
//header('Content-Length: ' . ob_get_length());
?>